package com.example.bbs.config;

public class HttpConstant {

    // public static final String SERVER_URL = "http://10.0.2.2:8000/"; // test mode
//    public static final String SERVER_URL = "http://183.173.200.164:8000/"; // local address for wifi
    public static final String SERVER_URL = "https://npawsl.com.cn/";
    public static final String MEDIA_URL = SERVER_URL + "media/";
    public static final String MEDIA_IMAGE_URL = MEDIA_URL + "images/";
    public static final String MEDIA_VIDEO_URL = MEDIA_URL + "videos/";
    public static final String MEDIA_AUDIO_URL = MEDIA_URL + "audios/";

    public static final String REQUEST_HELLO = "hello";
    public static final String REQUEST_QUERY_POST = "query_post";
    public static final String REQUEST_QUERY_DRAFT = "query_draft";
    public static final String REQUEST_GET_ESSAY = "get_essay";
    public static final String REQUEST_ADD_POST = "add_post";
    public static final String REQUEST_UPDATE_POST = "update_post";//草稿箱接口
    public static final String REQUEST_COMMENT_POST = "comment_post";
    public static final String REQUEST_COMMENT_GET = "comment_get";
    public static final String REQUEST_LOGIN = "login";
    public static final String REQUEST_REGISTER = "register";
    public static final String REQUEST_UPLOAD = "upload_media";
    public static final String REQUEST_GET_POST = "get_post";
    public static final String REQUEST_LIKE = "like";
    public static final String REQUEST_FOLLOW = "follow";
    public static final String REQUEST_GET_FOLLOW = "get_following";
    public static final String REQUEST_BE_FOLLOW = "get_followed";
    public static final String REQUEST_GET_USER = "get_user";
    public static final String REQUEST_UPDATE_USER = "update_user";
    public static final String REQUEST_ADD_NOTICE = "add_notice";
    public static final String REQUEST_READ_NOTICE = "read_notice";
    public static final String REQUEST_GET_NOTICE = "get_notice";
    public static final String REQUEST_BLOCK = "add_block";
    public static final String REQUEST_GET_BLOCK = "get_block";

    // 发送请求如果使用 form-data，将 key 写在这里
    public static final String FIELD_PARAM_1 = "param1";
    public static final String FIELD_USERID = "user_id";
    public static final String FIELD_PARAM_DATA = "request_data";
    public static final String FIELD_POST_ID = "post_id";
    public static final String FIELD_NOTICE_ID = "notice_id";
    // 收到的请求回复的所有 key 值，写在这里
    public static final String FIELD_REPLY = "reply";           // boolean
    public static final String FIELD_DATA = "data";             // 指定的返回数据形式
    public static final String FIELD_ERROR = "error_message";   // 当 reply = False 时，可能返回错误原因

    public static final String ERROR_TOKEN_INVALID = "invalid_token"; // Token 过期，应该重新登录
    public static final String ERROR_REGISTER_NAME_REPEATED = "repeated_name"; // 注册时命名重复
    public static final String ERROR_IDENTITY_THEFT = "identity_theft"; // 试图冒充他人发布信息
    public static final String ERROR_REGISTER_EMAIL_REPEATED = "repeated_email";//重复邮箱
}
